package com.rytx.system.domain.dto;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

@lombok.Data
public class UserRegistrationDTO {
    @NotBlank(message = "手机号码不能为空")
    @Size(min = 11, max = 11, message = "手机号码长度必须在11个字符")
    @Pattern(regexp = "^1[34578]\\d{9}$", message = "手机号码格式不正确")
    private String userPhone;
    @NotBlank(message = "密码不能为空")
    @Size(min = 6, max = 20, message = "密码长度必须在6-20个字符之间")
    private String userPassword;
    @NotBlank(message = "验证码不能为空")
    @Size(min = 6, max = 6, message = "验证码长度必须为6个字符")
    private String smsCode;
}
